﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XinHeWechat.Model
{
    public class BaseResponse<T>
    {
        /// <summary>
        /// 返回状态，0代表正常
        /// </summary>
        [Required]
        public int code { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        [Required]
        public string msg { get; set; }

        /// <summary>
        /// 返回数据
        /// </summary>
        [Required]
        public T data { get; set; }

        public BaseResponse()
        {
            code = -1;
        }
    }
}
